export type RepoBranchesApi = {
    name: string;
    commit: {
        sha: string;
        url: string;
    };
    protected: boolean;
};

export type RepoBranchesModel = {
    key: string;
    value: string;
};

export const normalizeRepoBranches = (from: RepoBranchesApi[]): RepoBranchesModel[] =>
    from.map((elem) => ({
        key: elem.name,
        value: elem.name,
    }));
